import 'package:flutter/material.dart';
import 'package:flutter_ohos/components/ColumnAndRowCase.dart';
import 'package:flutter_ohos/components/ContainerCase.dart';
import 'package:flutter_ohos/components/ContainerCase2.dart';
import 'package:flutter_ohos/components/CustomScrollViewCase.dart';
import 'package:flutter_ohos/components/DioCase.dart';
import 'package:flutter_ohos/components/ExpandCase.dart';
import 'package:flutter_ohos/components/FoodDetail.dart';
import 'package:flutter_ohos/components/GridExtentCast.dart';
import 'package:flutter_ohos/components/GridViewBuilderCase.dart';
import 'package:flutter_ohos/components/GridViewCase.dart';
import 'package:flutter_ohos/components/ImageCase.dart';
import 'package:flutter_ohos/components/ListViewBuilderCase.dart';
import 'package:flutter_ohos/components/ListViewCase.dart';
import 'package:flutter_ohos/components/ListViewSeparatedCast.dart';
import 'package:flutter_ohos/components/MTMain.dart';
import 'package:flutter_ohos/components/TabsCase.dart';
import 'package:flutter_ohos/components/TextCase.dart';
// material 是谷歌提供的一套素材库 好比 Vue2中的element-ui
// 集成到flutter中了
import 'components/ImageCase2.dart';
import 'components/StateLessCase.dart';
import 'components/StateFulCase.dart';
import 'components/ParentCase.dart';
import 'components/LifeCase.dart';

void main() {
  runApp(MaterialApp(
    // home: Scaffold(
    //   appBar: AppBar(title: Text("首页"), backgroundColor: Colors.blue),
    //   body: Text("测试"),
    // ),
    routes: {
      "/": (context) => const MTMain(), // 地址-组件的映射
      "/detail": (context) => const FoodDetail(), // 地址-组件的映射
      '/tabs': (context) => const TabsCase() // tabs案例
    },
    // home: Scaffold(
    // body: MTMain(),
    // appBar: AppBar(
    //   title: const Text("我的第一个Flutter组件"),
    // ),
    // body: DioCase(),
    // body: CustomScrollViewCase(),
    // body: GridExtentCast(),
    // body: GridViewBuilderCase(),
    // body: GridViewCase(),
    // body: ListViewSeparatedCast(),
    // body: ListViewBuilderCase(),
    // body: ListViewCase(),
    // body: ExpandCase(),
    //body: ColumnAndRowCase(),
    // body: ImageCase2(),
    // body: const TextCase(),
    // body: ContainerCase(),
    // body: ContainerCase2(),
    // body: Container(
    //   child: Column(
    //     children: const [
    //       Text('Hello 各位'),
    //       StateLessCase(
    //         title: '测试123',
    //       ), // 给构造函数传递参数
    //       StateFulCase(
    //         title: "语雀真厉害",
    //       ),
    //       ParentCase(),
    //       LifeCase()
    //     ],
    //   ),
    // ),
  ));
  // MyApp是一个根组件

  // Vue2 Vue3 new Vue({ render: h => h(App) })
  // app.mount('#app')
}
// material 一套UI组件库 必须被MatrialApp包裹

// Scaffold

// Column Row均不能设置高度 宽度  背景色 
// Container SizeBox